The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent the work is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
Storage devices such as solid state drives (SSDs) may include one or more flash memory devices. For example only, the flash memory devices may include NAND-based flash memory. Typically, storage regions of flash memory are arranged in blocks, which are each divided into addressable pages. Data is written to and stored in the flash memory on a page-by-page basis within the blocks. Conversely, to rewrite or erase data, the entire corresponding block is erased.
When data stored in a particular page is updated, all of the valid data in the block needs to be erased and rewritten (i.e., any pages storing data that has not been changed or updated). Invalid data (i.e., pages storing data that has been changed or updated and therefore already rewritten elsewhere) may simply be erased. For example, a host that writes to the storage device writes data to a logical address such as a logical block address (LBA). Conversely, the storage device maps and writes the data to a physical address corresponding to the logical address. When the storage device needs to update data in a particular physical address (i.e., in one or more pages in a block), the entire block is erased and written to the same block or a different block, but the corresponding logical address remains the same. Accordingly, a system that includes the storage device performs a greater number of write operations than the host.
In other words, a number of physical writes is greater than a number of logical writes. A ratio of the number of physical writes to the number of logical writes may be referred to as write amplification (WA). A relatively high write amplification (e.g., a WA of 5 or greater) results in more wear on the storage device, and therefore a shorter lifetime of the storage device. Conversely, a relatively low write amplification (e.g., a WA approaching 1) improves performance and the lifetime of the storage device.
The storage device may implement wear-leveling and overprovisioning to minimize the write amplification. For example, overprovisioning refers to providing a greater number of physical locations in the storage device than a corresponding number of logical addresses associated with the host (i.e., a logical capacity of the host). In other words, the storage device includes more physical locations than the host includes logical locations. The surplus of physical locations provides excess physical capacity to the storage device. A ratio of the excess physical capacity of the storage device to the overall physical capacity of the storage device (and the logical capacity of the host) is referred to as an overprovision ratio (OPR). For example, if the storage device has an overall physical capacity of 100 gigabytes (GB) and the logical capacity of the host is 75 GB, then the OPR is 25:100, or 25%.
The OPR of the storage device may be directly related to the write amplification of the storage device. For example, when data stored in a single page of the flash memory data is updated, the data can be rewritten to an empty page in an extra physical location in a different block of the flash memory instead of erasing an entire block that is currently storing the data. The original page storing the data may simply be marked as stale or invalid, avoiding a complete rewrite of the entire block. This can be repeated for additional writes until the entire block is full of invalid data or the ratio of invalid data to valid data is greater than a threshold, and/or according to cleanup and merge operations (e.g., garbage collection). Accordingly, as the OPR of the storage device increases, the write amplification of the storage device decreases because a number of additional rewrites can be avoided. For example only, an OPR of 10% may correspond to a write amplification of approximately 5, an OPR of 25% may correspond to a write amplification of approximately 2, and an OPR of 50% may correspond to a write amplification approaching 1.